package app.stock.common;

import java.util.Date;

public class Transaction {

    public static String label = "交易明细";

    public int id;
    public static String idName = "id";
    public static String idLabel = "ID";
    public Date date;
    public static String dateName = "date";
    public static String dateLabel = "交易日期";
    public String type;
    public static String typeName = "type";
    public static String typeLabel = "业务代码";
    public String code;
    public static String codeName = "code";
    public static String codeLabel = "证券代码";
    public String name;
    public static String nameName = "name";
    public static String nameLabel = "证券名称";

    public float price;
    public static String priceName = "price";
    public static String priceLabel = "成交价格";
    public int amount;
    public static String amountName = "amount";
    public static String amountLabel = "成交数量";
    public float sum1;
    public static String sum1Name = "sum1";
    public static String sum1Label = "成交金额";

    public float sum2;
    public static String sum2Name = "sum2";
    public static String sum2Label = "发生金额";
    public float price2;
    public static String price2Name = "price2";
    public static String price2Label = "成本价格";

    public float shouxufei;
    public static String shouxufeiName = "shouxufei";
    public static String shouxufeiLabel = "手续费";
    public float yinhuashui;
    public static String yinhuashuiName = "yinhuashui";
    public static String yinhuashuiLabel = "印花税";
    public float guohufei;
    public static String guohufeiName = "guohufei";
    public static String guohufeiLabel = "过户费";

    public int currentAmount;
    public static String currentAmountLabel = "持股数量";
    public float currentCash;
    public static String currentCashLabel = "现金";

    public Account account;

    @Override
    public String toString() {
        return this.type + ":" + this.code + this.name + "(" + this.price + "*"
                + this.amount + "=" + this.sum1 + "," + this.sum2 + ","
                + this.shouxufei + "," + this.yinhuashui + "," + this.guohufei
                + ")";
    }
}
